package com.kma.summer2012.client.events.manager;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class ShowRequestManager extends GwtEvent<ShowRequestManager.ShowRequestManagerHandler> {
    public static Type<ShowRequestManagerHandler> TYPE = new Type<ShowRequestManagerHandler>();

    private UICrumbsRequest request;

    public ShowRequestManager() {

    }

    public ShowRequestManager(UICrumbsRequest req) {
        request = req;

    }

    public interface ShowRequestManagerHandler extends EventHandler {
        void onShowPageEvent(ShowRequestManager event, UICrumbsRequest request);
    }

    @Override
    public Type<ShowRequestManagerHandler> getAssociatedType() {
        return TYPE;
    }


    public static Type<ShowRequestManagerHandler> getType() {
        return TYPE;
    }

    protected void dispatch(ShowRequestManagerHandler handler) {
        handler.onShowPageEvent(this, request);
    }


}

